<?php 
  require_once("../../includes/config.php"); 
  
  $sql = 'SELECT * FROM contracts 
          LEFT JOIN clients ON 
              contracts.client_id=clients.id 
          WHERE contracts.owner_id = ? and (contract_status = 2)';

  $binds = array();
  
  $binds['owner_id'] = $_SESSION['user_id'];

  $contracts = query($sql,$binds);
  renderWithoutHeader("services/choose_contract.php",array("contracts"=>$contracts,"binds"=>$binds));
?>